<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
<link rel="stylesheet" type="text/css" href="../template/css.css" media="all" />
<title>QueroTeto</title>

</h:head>
<h:body>
	<div id="corpo">
		<ui:include src="/template/topo.xhtml"/>
		<ui:include src="/template/menu.xhtml"/>
		
		<div id="conteudo">
			<div id="centro">		
				#{cadastroImovelBean.msg}		
				<h:form id="form">  
    				<p:panel header="Imóvel">
    					<h:panelGrid columns="2" cellpadding="5">
				    				    	
				      	<h:outputText value="Rua: " />  
            			<h:outputText value="#{cadastroImovelBean.imovel.rua}"/>
            			
            			<h:outputText value="Bairro: "  />  
            			<h:outputText value="#{cadastroImovelBean.imovel.bairro}" required="true" id="bairro"/>
            			
            			<h:outputText value="CEP: "/>  
            			<h:outputText value="#{cadastroImovelBean.imovel.cep}" mask="99999-999" id="cep"/>
            			
            			<h:outputText value="Cidade: " />  
            			<h:outputText value="#{cadastroImovelBean.imovel.cidade}" required="true" id="cidade"/>
            			
            			<h:outputText value="Estado: " />
            			<h:outputText value="#{cadastroImovelBean.imovel.estado}" required="true" id="estado"/>
            			             
            			<h:outputText value="Numero: " />  
            			<h:outputText value="#{cadastroImovelBean.imovel.numero}" id="numero"/>
            			
            			<h:outputText value="Referencia: " />  
            			<h:outputText value="#{cadastroImovelBean.imovel.referencia}" required="true" id="referencia"/>  
	              
			            <h:outputText value="Tipo " />  
            			<h:outputText value="#{cadastroImovelBean.imovel.tipo}"/>
            			
            			<h:outputText value="Quantidade de quartos: " />  
            			<h:outputText value="#{cadastroImovelBean.imovel.qtdQuartos}"/>
              
            			<h:outputText value="Quantidade de banheiros: " />  
			            <h:outputText value="#{cadastroImovelBean.imovel.qtdBanheiros}" />  
    					
    					<h:outputText value="Possui garagem: " />  
			            <h:outputText value="#{cadastroImovelBean.imovel.garagem?'Sim':'Não'}" />
    					
  						<h:outputText value="Valor aluguel: " />  
			            <h:outputText value="R$#{cadastroImovelBean.imovel.valorAluguel}">
			            		<f:convertNumber pattern="#,##0" locale="pt_BR"/>
			            </h:outputText>
  
 					    <h:outputText value="Descrição: " />  
			            <h:outputText value="#{cadastroImovelBean.imovel.descricao}" />
  
  
    					
    					
    					
    					<p:commandButton value="Editar Imóvel" type="submit" action="#{cadastroImovelBean.editar}" ajax="false">
    					<f:param name="id" value="#{cadastroImovelBean.imovel.idPk}" />
           				</p:commandButton>
    					<p:commandButton value="Voltar" type="submit" action="#{cadastroImovelBean.cancelar}" ajax="false"/>
           				<p:commandButton value="Excluir Imóvel" type="submit" action="#{cadastroImovelBean.excluir}" onclick="return confirm('Deseja realmente Excluir?')" ajax="false" >
           					<f:param name="id" value="#{cadastroImovelBean.imovel.idPk}" />
           				</p:commandButton>  
  			    		</h:panelGrid>  
    				
    		
    				
    				</p:panel>  
				</h:form>  
			</div>	
			<div id="direita" align="center">
				
			</div>
		</div>
		<div id="both" align="center"></div>
		<ui:include src="/template/rodape.xhtml"/>
	</div>
</h:body>
</html>